//
//  UICollectionView+ResponseToEventOutOfSuperView.m
//  BaxTer
//
//  Created by wsj2015 on 2016/11/14.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#import "UICollectionView+ResponseToEventOutOfSuperView.h"

@implementation UICollectionView (ResponseToEventOutOfSuperView)



- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
    UIView *view = [super hitTest:point withEvent:event];
    if (view == nil) {
        for (UIView *subView in self.subviews) {
            CGPoint tp = [subView convertPoint:point fromView:self];
            if (CGRectContainsPoint(subView.bounds, tp)) {
                view = subView;
            }
        }
    }
    return view;
}
@end
